September 9, 2000
benchvar speedIsNotPositive = ! (theSpeed > 0);
if (theSpeed > 0 && theSpeed < 10) StartNewTrial();
if (theSpeed < 0 || theSpeed > 10) return;
if (theSpeed < 0 || theSpeed >= 10 && theFlag == 3) return;
benchvar negativeNine = - (3 ^ 2);
benchvar aNine = 3 ^ 2;
benchvar theValue = (3 / 4.0 + 1) * theSpeed;
benchvar theNewSpeed = 4 + theSpeedDelta - theOldSpeed; StartNewTrial("New Speed is " + theNewSpeed);
benchvar theValue = Sin(3.14159 / 12);
benchvar theValue = Sin(3.14159 / 12);
appfun Cube(inValue) { funvar theAnswer = inValue ^ 3; LogMessage("The answer is " + theAnswer); return theAnswer; }
appfun Cube(inValue) { return inValue ^ 3; }
benchfun Cube(inValue) { return inValue ^ 3; }
funvar theDelay = 0; while (True) { theDelay = theDelay + .1; // Exit from the loop if delay greater than .5 seconds. if (theDelay > .5) break; StartNewTrial(); }
funvar theDelay = 0; while (theDelay < 1) { theDelay = theDelay + .1; // Skip the trial if the delay is less than .5 seconds. if (theDelay < .5) continue; StartNewTrial(); }
if (theSpeed < 0) StartNewTrial(); else DisplayErrorAlert("The speed is negative!");
benchfun Cube(theValue) { return theValue ^ 3; }
funvar theDelay = 0; while (theDelay < 1) { SetTissueTypeJunctionalDelay("Ventricular Myocardial Tissue Type", theDelay); StartNewTrial("Delay is " + theDelay); theDelay = theDelay + .1; }
The name of the Subtissue of interest.
// Save the old atrial conduction speed factor and set it to .2. benchvar theOldFactor = GetSubtissueConductionSpeedFactor( "Atrial Myocardium"); SetSubtissueConductionSpeedFactor("Atrial Myocardium", .2);
benchvar theOldInterval = GetDefaultInteractivationInterval();
The name of the Subtissue of interest.
benchvar theThreshold = GetSubtissueExcitationThreshold("AV Node");
The name of the Modulator.
The desired level, measured in Modulator-dependent units.
SetModulatorLevel("Caffeine", .7);
The desired Time Segmentation interval (in seconds).
SetTimeSegmentationInterval(.01);
A Boolean Value indicating whether Time Segmentation should be enabled.
SetEnableTimeSegmentation(True);
A Boolean Value indicating whether Static Trials should be automatically terminated.
SetStopStaticTrials(False);
A Boolean Value indicating whether Automatic Cells should be automatically triggered more than once in a given Trial.
SetEnableAutomaticCellRetriggering(True);
A Boolean Value indicating whether Decremental Conduction Effects should be modelled in simulation Trials.
SetEnableDecrementalConduction(False);
A Boolean Value indicating whether Interval/Duration Effects should be modelled in simulation Trials.
SetEnableIntervalDurationEffects(False);
A Boolean Value indicating whether Interval/Potential Effects should be modelled in simulation Trials.
SetEnableIntervalPotentialEffects(True);
The name of the Subtissue to be stimulated.
SetEnableTimeSegmentation(True); SetTimeSegmentationInterval(.1); StartNewTrial(); StimulateSubtissue("Myocardial Cell Set", "Right Ventricular Free Wall"); SetEnableTimeSegmentation(False); ContinueTrial();
The desired Default Interactivation Interval (in seconds).
SetDefaultInteractivationInterval(.75);
The desired number of iterations of the procedure of Gelernter and Swihart to be applied during Surface Potential Transfer Coefficient computation.
SetNumGAndSIterations(0);
The desired new Regional Dipole Exclusion Radius (in meters).
// Set DSL Exclusion Radius to 2 cm. SetDSLExclusionRadius(.02);
// Set the Purkinje cell size to 2 mm. SetCellSetCellSize("Purkinje Cell Set", .002);
The name of the polyhedron of interest.
The Maximum Facet Size to be used when regenerating the given polyhedron.
// Set the maximum facet size for the outer torso to 1 cm. SetPolyhedronMaxFacetSize("Outer Torso Polyhedron", .01);
The name of the polyhedron of interest.
A Boolean Value indicating whether the given polyhedron should be Employed.
// Do not use the left ventricular intracavitary polyhedron in trials. SetPolyhedronEmployment("Left Ventricular Intracavitary Polyhedron", False);
The name of the target polyhedron.
A Boolean Value indicating whether Surface Potential Mapping should be enabled for the given polyhedron.
// Enable surface potential mapping for the left atrial intracavitary polyhedron. SetPolyhedronEnableSPM("Left Atrial Intracavitary Polyhedron", True);
The name of the Subtissue Wall for which the fiber angles are to be modified.
The desired fiber orientation for the outside of the Subtissue Wall (in degrees).
The desired fiber orientation for the inside of the Subtissue Wall (in degrees).
// Vary the RVFW angles between -30 to 45 degrees. SetSubtissueFiberAngles("Right Ventricular Free Wall", -30, 45);
The name of the Subtissue of interest.
A Boolean Value indicating whether Current Dipole generation should be enabled for the target Subtissue.
// Disable dipole generation in the atria. SetSubtissueGeneratesDipole("Atrial Myocardial Subtissue", False);
The name of the target Subtissue.
The desired Intramural Phase 2 Duration Gradient (in Volts/meter).
// Set the intramural gradient to -.4 V/m for the LV. SetSubtissueIntramuralPhase2DurationGradient("Left Ventricular Myocardium", -.4);
The desired Vertical Phase 2 Duration Gradient (in Volts/meter).
// Set the vertical phase 2 duration gradient to -.3 V/m. SetVerticalPhase2DurationGradient(-.3);
The name of the target Tissue Type.
A Boolean Value indicating whether the specified Tissue Type should obey Vertical Phase 2 Duration Gradients.
// Enable vertical phase 2 duration gradients for the ventricles. SetObeysVerticalPhase2DurationGradient("Ventricular Myocardial Tissue Type", True);
The name of the target Subtissue.
A Boolean Value indicating whether Cells of the specified Subtissue should be automatic.
// Disable automaticity of SA Node focus number 2. SetSubtissueIsAutomatic("SA Node 2", False);
The name of the target Subtissue.
The desired Automatic Period (in seconds).
// Change the automatic period to 700 ms for SA Node focus 3. SetSubtissueAutomaticPeriod("SA Node 3", .7);
The name of the target Subtissue.
The desired Coupling Interval (in seconds).
// Change the coupling interval to 15 ms for SA Node focus 1. SetSubtissueCouplingInterval("SA Node 1", .015);
The name of the target Subtissue.
The desired Conduction Speed Factor for the Subtissue.
// Set the conduction speed factor of the Left Fascicle to .17. SetSubtissueConductionSpeedFactor("Left LBB Fascicle", .17);
The name of the target Subtissue.
A Boolean Value indicating whether Cells of the specified Subtissue should be Excitable.
// Simulate RBBB by disabling the Right Bundle Branch. SetSubtissueExcitability("Right Bundle Branch", False);
The name of the target Subtissue.
The desired Excitation Threshold (in Volts).
// Set the excitation threshold of the AV Node to 65 mV. SetSubtissueExcitationThreshold("AV Node", .065);
The name of the target Tissue Type.
The desired conductivity (in Siemens/meter).
// Set the lung conductivity to .8 S/m. SetTissueTypeConductivity("Lung Tissue Type", .8);
The name of the target Tissue Type.
The desired ratio between axial and transverse conduction speeds.
// Set the longitudinal/transverse conduction speed ratio to 2.6 for // the atrial tissue. SetTissueTypeConductionSpeedRatio("Atrial Myocardial Tissue Type", 2.6);
The name of the target Tissue Type.
The desired Junctional Delay (in seconds).
// Set the Purkinje junctional delay to 9 milliseconds. SetTissueTypeJunctionalDelay("Purkinje Tissue Type", .009);
The name of the target Matrix.
ResetMatrix("Heart Transformation Matrix");
The name of the target Matrix.
The axis about which the rotation is to be performed.
The rotation angle (in degrees). Positive angles cause counter-clockwise rotation as seen from the origin looking along the axial basis vector.
RotateMatrix("Heart Transformation Matrix", X_AXIS, 30);
The name of the target Matrix.
The rescaling factors along each respective axis.
// Double the height of the torso. RescaleMatrix("Torso Transformation Matrix", 1, 2, 1);
The name of the target Matrix.
The translation magnitudes along each respective axis.
// Move the heart 1 cm to the right. RescaleMatrix("Heart Transformation Matrix", -.01, 0, 0);
The name of the target Matrix.
The axis about which the reflection is to take place.
// Reflect the torso about the X axis (right-to-left). ReflectMatrix("Torso Transformation Matrix", X_AXIS);
The name of the target Tissue Type.
A Boolean Value indicating whether Cells of the Tissue Type should possess distinct fiber orientations.
// Enable fiber orientations for the atria. SetTissueTypeHasOrientedFibers("Atrial Myocardial Tissue Type", True);
// If the speed is less than zero, abort the script. if (theSpeed < 0) AbortInterpretation();
The text of the message to be logged.
benchvar theSpeed = .47; LogMessage("Speed is " + theSpeed);
The text of the error alert.
// If the speed is negative, display an error alert. if (theSpeed < 0) DisplayErrorAlert("Speed is negative!");
The text of the error alert.
// If the speed is negative, display a warning. if (theSpeed < 0) DisplayWarningAlert("Speed is negative!");
The name to be used for the Trial.
// Run a trial without the left lung. SetPolyhedronEmployment("Left Lung Polyhedron", False); StartNewTrial("Without Left Lung");
// Run a trial for 100 milliseconds, notify the user, and then finish // the trial. SetEnableTimeSegmentation(True); SetTimeSegmentationInterval(.1); StartNewTrial(); DisplayWarningAlert("100 ms trial time expired."); SetEnableTimeSegmentation(False); ContinueTrial();
// Run a trial, and then log the trial statistics. StartNewTrial(); ReportTrialStatistics();
// Log facet proximities. CheckFacetProximities();
// Run a trial, and then log the action durations. StartNewTrial(); ReportActionDurations();
// Log the electrode transfer coefficients. ReportETC();
The value to be exponentiated.
// Compute the exponentiation of the log of 7 (which should be 7). benchvar shouldBeSeven = Exp(Log(7));
The value for which the natural logarithm is to be computed.
// Compute the natural log of e, which should be one. benchvar shouldBeOne = Log(Exp(1));
The value for which the base-10 logarithm is to be taken.
// Compute the base-10 logarithm of 100 (which should be 2). benchvar shouldBeTwo = Log10(100);
The angle for which the sine is to be computed (in radians).
// Compute the sine of (approximately) "pi". benchvar theSine = Sin(3.14159);
The angle for which the cosine is to be computed (in radians).
// Compute the cosine of (approximately) "pi". benchvar theCosine = Cos(3.14159);
The angle for which the tangent is to be computed (in radians).
// Compute the tangent of (approximately) "pi". benchvar theTan = Tan(3.14159);
The value for which the square root is to be computed.
// Compute the square root of two. benchvar theRoot = Sqrt(2);
// Log a random number. benchvar theRand = Random(); LogMessage(theRand + " is a random number.");
The name of the possible variable.
// Start a trial only the first time this code is executed. if (AppVarIsDefined("StopIt")) { StartNewTrial(); appvar StopIt; }
The name of the possible variable.
// Start a trial only the first time this code is executed in a bench. if (BenchVarIsDefined("StopIt")) { StartNewTrial(); benchvar StopIt; }
The value to be converted to an Integer.
// Convert 3.47 to an integer, which should round it down to 3. benchvar shouldBeThree = Int(3.47)
The value to be converted to a Float.
// Compute one-half, making sure to avoid integer arithmetic truncations. benchvar shouldBeOneHalf = 1 / Float(2);
The value to be converted to a String.
// Convert the integer 333 to the string "333". benchvar aStringWithThreeThrees = String(333);2 Mark Stevans2;}¶0í2STR ø„ˇˇ;}ô»